function getTime(time) {
    const date = new Date(Number(time));
    const year = date.getFullYear();
    let month = date.getMonth() + 1;
    month = month >= 10 ? month : `0${month}`;
    let day = date.getDate();
    day = day >= 10 ? day : `0${day}`;
    let hours = date.getHours();
    hours = hours >= 10 ? hours : `0${hours}`;
    let minutes = date.getMinutes();
    minutes = minutes >= 10 ? minutes : `0${minutes}`;
    let seconds = date.getSeconds();
    seconds = seconds >= 10 ? seconds : `0${seconds}`;
    const today = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; // 今天时间的时间戳获取精确到日
    return today;
}

export {
    getTime
}